// _Additive_Expression.cpp: implementation of the _Additive_Expression class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Expression.h"
#include "_Additive_Expression.h"
#include "Addop.h"
#include "Term.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

_Additive_Expression::_Additive_Expression()
{
}

_Additive_Expression::~_Additive_Expression()
{
}

BOOL _Additive_Expression::Interpret()
{
	_Additive_Expression* pE = NULL;
	return _DualityOperIterpret<Addop, Term, _Additive_Expression>(pE, this->Parent(), this, 2, CString(_T("+")), CString(_T("-")));
/*	ComplierNote* pNote = NULL;
	_Additive_Expression* pNext = NULL;
	pNote = new Addop;
	if(!pNote->Interpret())
	{
		delete pNote;
		return FALSE;
	}
	Operator(pNote);

	pNote = new Term;
	if(!pNote->Interpret())
	{
		delete pNote;
		return FALSE;
	}
	Note(pNote);

	CString strTemp;
	strTemp = m_pAAnalyzer->GetCurSymbol();
	if(strTemp == _T("+") || strTemp == _T("-"))
	{
		pNext = new _Additive_Expression;
		pNext->AAnalyzer(AAnalyzer());
		Next(pNext);
		return pNext->Interpret();
	}

	return TRUE;*/
}